package com.entity;

import lombok.Getter;

/**
 * @EnumName AlipayConfigEnum
 * @Description 支付宝的配置枚举类
 * @Author Kx
 * @Date 2025/6/3 9:02
 * @Version 1.0
 */
@Getter
public enum AlipayConfigEnum {

    INSTANCE(
        "YOUR WEB_URL", // 网关地址
        "YOUR APPID", // 应用ID
        "YOUR PERSON_KEY", // 用户私钥
        "YOUR PUBLIC_ALIPAY_KEY", // 支付宝公钥
        "UTF-8", // 字符编码
        "RSA2", // 签名类型
        "YOUR ACCELERATION TUNNEL/alipay/handleAliPayNotify", // 支付成功后的回调地址
        "YOUR ACCELERATION TUNNEL/alipay/return" // 支付成功后的跳转地址
    );

    private final String gatewayHost;
    private final String appId;
    private final String merchantPrivateKey;
    private final String alipayPublicKey;
    private final String charset;
    private final String signType;
    private final String notifyUrl;
    private final String returnUrl;

    /**
     * @author: kx
     * @date: 2025/6/3 9:06
     * @param gatewayHost : 网关地址
     * @param appId : 应用ID
     * @param merchantPrivateKey : 商户私钥
     * @param alipayPublicKey : 支付宝公钥
     * @param charset : 字符编码格式
     * @param signType : 签名方式
     * @param notifyUrl : 支付成功后的回调地址
     * @param returnUrl : 支付成功后的跳转地址
     * @description:
    */
    AlipayConfigEnum(String gatewayHost, String appId, String merchantPrivateKey, String alipayPublicKey, String charset, String signType, String notifyUrl, String returnUrl) {
        this.gatewayHost = gatewayHost;
        this.appId = appId;
        this.merchantPrivateKey = merchantPrivateKey;
        this.alipayPublicKey = alipayPublicKey;
        this.charset = charset;
        this.signType = signType;
        this.notifyUrl = notifyUrl;
        this.returnUrl = returnUrl;
    }

    public static AlipayConfigEnum getInstance() {
        return INSTANCE;
    }
}
